
<!--# include virtual="/admin/common/html/_footer.html"-->
<body style="position: relative;">
	<script id="context" name="context"  type="text/plain" style="width:100%;height:800px;"></script>
	
	<div class="layui-layer-btn" style="position: fixed;bottom: 0;left: 0;width: 100%;z-index: 10000;background: #FFFFFF;padding: 20px 20px;"><a onclick="confirm()" class="layui-layer-btn0">修改并保存</a><a class="layui-layer-btn1" onclick="close_pop()">取消并关闭</a></div>
</body>
<script>
	$("#context").html(parent.explains_txt);
	var explainEditor=UE.getEditor('context',{
		initialFrameHeight:500,
		autoHeightEnabled:false
	});
	var guidanceId=GetQueryString("guidanceId");
	function confirm(index, layero){ //按钮【按钮一】的回调
   	  	var value = explainEditor.body.innerHTML;
		$.post("/guidance_service/front/guidance/update.do",{
			guidanceId:guidanceId,
			explains:value
		},function(result){
	 		if(result.resultCode ==200){
	 			layer.msg(result.message,{icon:1,time:2000},function(){
	 				parent.upClick(value,guidanceId);
	 			});
	 		}else{
	 			layer.msg(result.message,{icon:2,time:2000});
	 		}
	 		
		});
		close_pop();
	  }
	function close_pop(){
		
		var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
	    parent.layer.close(index);
	}
</script>